Shaders are components in graphics processors which perform a variety of tasks related to various aspects (e.g. vertices, geometry, pixels, etc.) of the rendering process. Shaders typically operate under the control of shader programs that are written to address a large amount of data (e.g. each pixel in an area of a screen, every vertex of a model, etc.). Further, the foregoing processing typically has few interdependencies. Thus, shaders typically rely heavily on parallel processing, whereby a plurality of threads is executed in parallel.
While such parallel processing is ideal when addressing the foregoing types of graphics processing, it is less effective in gathering statistics. In particular, each of the aforementioned threads typically complete any and all associated processing before a large amount of related data is subsequently written to memory. Further, before such data can be used to gather statistics, etc., prior art systems conventionally require an additional reduction pass to prepare the data for such purpose.
The requirement of such additional pass typically results in less efficiency and additional expense. For example, the amount of data that is subjected to the additional pass may be quite voluminous. This, in turn, requires additional storage and processing resources.
There is thus a need for addressing these and/or other issues associated with the prior art.